/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.mlbs.session.generated;

import com.mlbs.entity.Appusage;
import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

/**
 *
 * @author mckd87
 */
@PersistenceContext(name="mlbs-ejbPU", unitName="mlbs-ejbPU")
@Stateless
public class AppusageFacade implements AppusageFacadeLocal, AppusageFacadeRemote {
    @PersistenceContext(unitName="mlbs-ejbPU")
    private EntityManager em;

    public void create(Appusage appusage) {
        em.persist(appusage);
    }

    public void edit(Appusage appusage) {
        em.merge(appusage);
    }

    public void remove(Appusage appusage) {
        em.remove(em.merge(appusage));
    }

    public Appusage find(Object id) {
        return em.find(com.mlbs.entity.Appusage.class, id);
    }

    public List<Appusage> findAll() {
        return em.createQuery("select object(o) from Appusage as o").getResultList();
    }

}
